package vwg;

import model.WavToArffParser;
import model.WavToInstanceParser;
import weka.core.Instance;
import weka.core.Instances;
import classification.Classifier;


/**
 * budowanie mavenem : clean package
 * arguments : relativeSrcPath relativeTargetPath isClassified isCustomExtractor attributesCount
 * example usage : java -jar target\vwg-0.0.1-SNAPSHOT.jar /src/main/resources/Alfabet/ /src/main/result/RESULT.arff true true 5
 * @author Gosia
 *
 */

public class App {

	public static void main(String[] args) {
		System.out.println("Wait for it...");

		AppArguments appArgs = new AppArguments();
		appArgs.parseArgs(args);
		
		 Instances instances =  WavToArffParser.parseToArff(System.getProperty("user.dir") + appArgs.getRelSrc(),
		  System.getProperty("user.dir") + appArgs.getRelTarget(), appArgs.isClassified(),
		  appArgs.isCustomExtractor(), appArgs.getAttributesCount());
		 
		 
		 /* do tej zmiennej wrzuc sciezke do pliku, ktory chcialbys sklasyfikowac*/
		 String absoluteFileNameToClassify = System.getProperty("user.dir")
					+ "/src/main/resources/Alfabet/ES_2.WAV";
//		 
//		 Instance instanceFromStart = WavToInstanceParser.parseToInstance(absoluteFileNameToClassify, instances, true);
//		 Instance instanceFromEnd = WavToInstanceParser.parseToInstance(absoluteFileNameToClassify, instances, false);
//		 
//		 Classifier classifier = null;
//		 try {
//			classifier = Classifier.getClassifier(instances);
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//
//		String classify;
//		try {
//			classify = classifier.classifyPair(instanceFromStart, instanceFromEnd);
//			System.out.println("OK, it's " + classify);
//					
//		} catch (Exception e) {
//			e.printStackTrace();
//		}

	}
}
